package com.ma.controller.user;

import com.ma.common.constant.MessageConstant;
import com.ma.common.exception.AccountNotFoundException;
import com.ma.common.result.Result;
import com.ma.service.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  用户
 * </p>
 *
 * @author ldc
 * @since 2023-08-28
 */
@RestController
@RequestMapping("/user")
@Api(tags = "用户相关接口")
@Slf4j
@CrossOrigin(origins = "*")
public class UserController {
    @Resource
    private IUserService userService;

    @PostMapping("/login")
    @ApiOperation(value = "用户登录")
    private Result login(){
        log.info("用户登录...");
        throw new AccountNotFoundException(MessageConstant.ACCOUNT_NOT_FOUND);
//        return Result.success();
    }
}
